package com.qf.mapper;

import com.qf.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@Mapper
public interface UserMapper {

    /**
     * 注册
     * @param user
     * @return
     */
    int register(User user);

    /**
     * 登录
     * @param u_name
     * @param u_pwd
     * @return
     */
    User userLogin(@Param("u_name") String u_name, @Param("u_pwd") String u_pwd);

    List<User> login(@PathVariable("u_name") String u_name);

}
